const vscode = require('vscode');
const fs = require('fs');

function load() {
    const path = vscode.workspace.getConfiguration().get('vscodeMiniBook.bookPath')
    const fsBook = fs.readFileSync(path);
    const bookContent = fsBook.toString().replace(/\n/g,'')
    if (bookContent.length > 0) {
		vscode.window.showInformationMessage('文档加载成功！');
    } else {
		vscode.window.showErrorMessage('空文档！');
    }
    return bookContent
}

module.exports = {
    load
}